package com.passivator.model;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Sessions entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "SESSIONS", schema = "SESSIONS")
public class Sessions implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 760265825540144640L;
	private Long idsession;
	private Date passivationDate;
	private byte[] content;

	// Constructors

	/** default constructor */
	public Sessions() {
	}

	/** full constructor */
	public Sessions(Long idsession, Date passivationDate, byte[] content) {
		this.idsession = idsession;
		this.passivationDate = passivationDate;
		this.content = content;
	}

	// Property accessors
	@Id
	@Column(name = "IDSESSION", unique = true, nullable = false)
	public Long getIdsession() {
		return this.idsession;
	}

	public void setIdsession(Long idsession) {
		this.idsession = idsession;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "PASSIVATION_DATE", nullable = false, length = 10)
	public Date getPassivationDate() {
		return this.passivationDate;
	}

	public void setPassivationDate(Date passivationDate) {
		this.passivationDate = passivationDate;
	}

	@Lob
	@Column(name = "CONTENT", nullable = false)
	public byte[] getContent() {
		return this.content;
	}

	public void setContent(byte[] content) {
		this.content = content;
	}

}